//
//  NSMutableAttributedString+CLCategory.m
//  CLBrowser
//
//  Created by 梁慧聪 on 2022/7/19.
//

#import "NSMutableAttributedString+CLCategory.h"
#import <objc/runtime.h>
@implementation NSMutableAttributedString (CLCategory)

-(void)setLineSpacing:(CGFloat)lineSpacing {
    objc_setAssociatedObject(self, @selector(lineSpacing), @(lineSpacing), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    if (NULLString(self.string)) {
        return;
    }
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.lineSpacing = lineSpacing;// 字体的行间距
}

- (CGFloat)lineSpacing {
    return [objc_getAssociatedObject(self, _cmd) floatValue];
}
@end
